Repository navigation
Point analyze_misses diagnostic at vulnhunt/phases - #49
Open
adityaanikam wants to merge 1 commit into
Open
adityaanikam wants to merge 1 commit into
adityaanikam wants to merge 1 commit into
Conversation
analyze_misses resolved the phase prompts under REPO_ROOT/skill/phases. REPO_ROOT is the harness/ directory, so that path does not exist; the prompts live in vulnhunt/phases at the top of the repository. Since the diagnostic session was limited to Read/Grep/Glob inside its --add-dir roots, it could not read the prompts it is asked to fix, and claude accepts the missing --add-dir without an error. Resolve the prompts from the repository root in PHASE_TO_PROMPT, the diagnostic prompt, the system prompt and the --add-dir, and add tests that every prompt file and every --add-dir root exists. Fixes capitalone#47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #47.
analyze_missespointed the diagnostic atREPO_ROOT/skill/phases.REPO_ROOTisharness/(local_harness/config.py), so that resolves toharness/skill/phases, which does not exist. The phase prompts are invulnhunt/phases/. Since #10 the diagnostic session only has Read/Grep/Glob inside its--add-dirroots, so it could not read the prompts it is asked to fix, andclaudeaccepts the missing--add-dirwithout an error.Change
In
harness/local_harness/benchmark/analyze_misses.py:PROJECT_ROOT(the parent ofREPO_ROOT) andPROMPTS_DIR(vulnhunt/phases).PHASE_TO_PROMPTlistsvulnhunt/phases/...paths, resolved fromPROJECT_ROOT. These are also the paths shown inMISS_ANALYSIS.md.--add-diruse the same location.I pointed it at the repository copy rather than the installed skill (
PHASES_DIRinconfig.py), because the diagnostic suggests edits to these prompt files and the report then names files that exist in the repo. If you would rather it read the installed copy that the scan ran with, that is a small change.Tests
Two tests in
harness/tests/test_analyze_misses.py:test_phase_prompt_files_exist: every file inPHASE_TO_PROMPTexists under the repository root.test_invoke_diagnostic_add_dirs_exist: every--add-dirpassed toclaudeis an existing directory.Both fail on
main, listing theskill/phases/...files and theharness/skill/phasesdirectory, and pass with this change. The full harness suite passes on Linux (WSL, Python 3.12):pytest tests/ --cov=local_harnessgives 214 passed, with coverage unchanged at 95%. I did not run a real diagnostic againstclaude.